import React from 'react';
import { useDrag,useDrop} from 'react-dnd';
import { ItemTypes } from './ItemTypes';
const Box = ()=>{
  const [, drag] = useDrag(() => ({ type: ItemTypes.CARD }))
  const [, drop] = useDrop(() => ({  accept: ItemTypes.CARD,}))
return (
  <div ref={(node)=>drag(drop(node))} >
  Drag me
</div>
)
}
export default Box